package com.hexin.download.util;

public final class StringUtils {
    public static String getFileSuffix(String url){
        int sum = url.lastIndexOf(".");
        return url.substring(sum);
    }
    public static String GetProces(int total, int finish) {
        StringBuilder str = new StringBuilder();
        str.append("\r完成[");
        for (int i = 0; i < total; i++) {
            if (i > finish) {
                str.append(" ");
            } else if (i == finish) {
                str.append(">");
            } else {
                str.append("=");
            }
        }
        str.append("]" + finish + "%");
        return str.toString();
    }
}
